package com.ruoyi.his.service.impl;

import com.ruoyi.his.domain.TMedicalDrugsPurchase;
import com.ruoyi.his.domain.vo.TMedicalDrugsPurchaseVo;
import com.ruoyi.his.mapper.TMedicalDrugsPurchaseMapper;
import com.ruoyi.his.service.ITMedicalDrugsPurchaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 药品采购Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-09-10
 */
@Service
public class TMedicalDrugsPurchaseServiceImpl implements ITMedicalDrugsPurchaseService
{
    @Autowired
    private TMedicalDrugsPurchaseMapper tMedicalDrugsPurchaseMapper;

    /**
     * 查询药品采购
     * 
     * @param purchaseid 药品采购主键
     * @return 药品采购
     */
    @Override
    public TMedicalDrugsPurchase selectTMedicalDrugsPurchaseByPurchaseid(Long purchaseid)
    {
        return tMedicalDrugsPurchaseMapper.selectTMedicalDrugsPurchaseByPurchaseid(purchaseid);
    }

    /**
     * 查询药品采购列表
     * 
     * @param tMedicalDrugsPurchaseVo 药品采购
     * @return 药品采购
     */
    @Override
    public List<TMedicalDrugsPurchaseVo> selectTMedicalDrugsPurchaseList(TMedicalDrugsPurchaseVo tMedicalDrugsPurchaseVo)
    {
        return tMedicalDrugsPurchaseMapper.selectTMedicalDrugsPurchaseList(tMedicalDrugsPurchaseVo);
    }

    /**
     * 新增药品采购
     * 
     * @param tMedicalDrugsPurchase 药品采购
     * @return 结果
     */
    @Override
    public int insertTMedicalDrugsPurchase(TMedicalDrugsPurchase tMedicalDrugsPurchase)
    {
        return tMedicalDrugsPurchaseMapper.insertTMedicalDrugsPurchase(tMedicalDrugsPurchase);
    }

    /**
     * 修改药品采购
     * 
     * @param tMedicalDrugsPurchase 药品采购
     * @return 结果
     */
    @Override
    public int updateTMedicalDrugsPurchase(TMedicalDrugsPurchase tMedicalDrugsPurchase)
    {
        return tMedicalDrugsPurchaseMapper.updateTMedicalDrugsPurchase(tMedicalDrugsPurchase);
    }

    /**
     * 批量删除药品采购
     * 
     * @param purchaseids 需要删除的药品采购主键
     * @return 结果
     */
    @Override
    public int deleteTMedicalDrugsPurchaseByPurchaseids(Long[] purchaseids)
    {
        return tMedicalDrugsPurchaseMapper.deleteTMedicalDrugsPurchaseByPurchaseids(purchaseids);
    }

    /**
     * 删除药品采购信息
     * 
     * @param purchaseid 药品采购主键
     * @return 结果
     */
    @Override
    public int deleteTMedicalDrugsPurchaseByPurchaseid(Long purchaseid)
    {
        return tMedicalDrugsPurchaseMapper.deleteTMedicalDrugsPurchaseByPurchaseid(purchaseid);
    }
}
